<?php
include_once 'DAO/FollowDAO.class.php';
session_start();
$following = $_GET['followingId'];

if(isset($_SESSION['login'])){
    if($_SESSION['login']){
        $loggedUser = $_SESSION['userId'];
        $followDao = new FollowDAO();
        $followDao->removeFollow($loggedUser, $following);
        header("Location: user.php?userId=$following");
    }
    else{
        echo 'Δεν έχετε συνδεθεί.';
    }
}
else{
        echo 'Δεν έχετε συνδεθεί.';
}
?>